package com.zhanglingfei.yuekaoshop.entity;

import lombok.Data;

import java.io.Serializable;

import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author Shichao.Lu
 * 规格参数的分组表，每个商品分类下有多个规格参数组
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "tb_spec_group")
@DynamicInsert
@DynamicUpdate
public class SpecGroup implements Serializable {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private Long id;

	/**
	 * 商品分类id，一个分类下有多个规格组
	 */
	@Column(name = "cid")
	private Long cid;

	/**
	 * 规格组的名称
	 */
	@Column(name = "name")
	private String name;
}
